import type { CreatedRoomMessageData } from "../types/MessageData";
import { useRoomState } from "@/hooks/useRoomState";

export const createdRoomHandler = (payload: CreatedRoomMessageData["payload"]) => {
	const roomState = useRoomState();
	roomState.room.value = {
		roomId: payload.roomId,
		name: "",
		heros: [],
		players: [],
		drawCards: [],
		discardCards: [],
		logs: [],
	};
};
